<?php 

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Language extends CI_Controller {

function __construct() {
     	
        parent::__construct();
        //$this->load->helper('url');
        //$this->load->library('parser');
        //$this->template->set_template('home');
       
        
        //$this->load->model('popup_model', 'popup', true);
        //$this->load->model('ncategory_model', 'ncategory', true);
        //$this->buildFrontEndTopMenu();
        //$this->buildSlider();
        
     }
     
	public function index($lang = 'vi')
	{
		$lang = trim($lang);
		
		//$lang_arr = array('en', 'vi');
		
		//if (in_array($lang, $lang_arr))
		$this->session->set_userdata('lang', $lang);
		$array = array('error' => false, 'message' => 'set language to ' . $lang);
		
		echo json_encode($array);
	}
	
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */